package com.chb.service.impl;

/**
 * @author ：张家琪
 * @date ：Created in 2023/10/12 11:44
 * @description：
 * @modified By：
 * @version:
 */

import com.chb.dao.TransferDao;
import com.chb.model.entity.Branch;
import com.chb.model.entity.Shopkeeperchange;
import com.chb.model.vo.Result;
import com.chb.service.TransferService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class TransferServiceImpl implements TransferService {
    @Autowired
    private TransferDao transferDao;
    @Autowired
    private TransferService transferService;

    /**
     * @param
     * @return
     * @create by: 张77
     * @description:显示调动信息
     * @create time: 2023/10/12 11:40
     */
    @Override
    public Result transferInfo(Integer currentPage, Integer pageSize, String[] time) {
        String startTime=null;
        String endTime=null;
        if (time.length>0){
            startTime=time[0];
            endTime=time[1];
        }
        PageHelper.startPage(currentPage, pageSize);
        List<Shopkeeperchange> transferinfo = transferDao.transferinfo(startTime,endTime);
        PageInfo<Shopkeeperchange> pageInfo = new PageInfo<>(transferinfo);
        return new Result(200, "成功", pageInfo);
    }
}